﻿<UserControl x:Class="Bauble.Buttons.Clock"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Viewbox>
        <Canvas Width="100" Height="100" x:Name="_canvas">

            <Ellipse Canvas.Left="0" Canvas.Top="0" Width="100" Height="100">
                <Ellipse.Fill>
                    <RadialGradientBrush>
                        <GradientStop Offset="0.0" Color="White" />
                        <GradientStop Offset="0.95" Color="White" />
                        <GradientStop Offset="1.0" Color="Transparent" />
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Ellipse Canvas.Left="3" Canvas.Top="3" Width="94" Height="94">
                <Ellipse.Fill>
                    <LinearGradientBrush StartPoint="0.4,0.1" EndPoint="0.6,0.9">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Offset="0.0" Color="#888888" />
                            <GradientStop Offset="1.0" Color="#111111" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Ellipse.Fill>
            </Ellipse>

            <Canvas x:Name="_markersCanvas" />

            <Canvas>
                <Canvas.BitmapEffect>
                    <DropShadowBitmapEffect ShadowDepth="1" Softness="0.1" Opacity="0.5" />
                </Canvas.BitmapEffect>
                <Rectangle Width="8" Height="36" Fill="White" Stroke="#333333" StrokeThickness="0.6" RadiusX="2" RadiusY="2">
                    <Rectangle.RenderTransform>
                        <TransformGroup>
                            <TranslateTransform X="-4" Y="-32" />
                            <RotateTransform Angle="{Binding HourAngle}" />
                            <TranslateTransform X="50" Y="50" />
                        </TransformGroup>
                    </Rectangle.RenderTransform>
                </Rectangle>

                <Rectangle Width="5" Height="44" Fill="White" Stroke="#333333" StrokeThickness="0.6" RadiusX="1" RadiusY="1">
                    <Rectangle.RenderTransform>
                        <TransformGroup>
                            <TranslateTransform X="-2.5" Y="-41.5" />
                            <RotateTransform Angle="{Binding MinuteAngle}" />
                            <TranslateTransform X="50" Y="50" />
                        </TransformGroup>
                    </Rectangle.RenderTransform>
                </Rectangle>
            </Canvas>

            <Canvas>
                <Canvas.BitmapEffect>
                    <DropShadowBitmapEffect ShadowDepth="1" Softness="0.05" Opacity="1.0" />
                </Canvas.BitmapEffect>
                <Rectangle Width="1" Height="46" Fill="Red">
                    <Rectangle.RenderTransform>
                        <TransformGroup>
                            <TranslateTransform X="-0.25" Y="-45.75" />
                            <RotateTransform Angle="{Binding SecondAngle}" />
                            <TranslateTransform X="50" Y="50" />
                        </TransformGroup>
                    </Rectangle.RenderTransform>
                </Rectangle>
            </Canvas>

            <Ellipse Canvas.Left="3" Canvas.Top="3" Width="94" Height="94">
                <Ellipse.Fill>
                    <RadialGradientBrush Center="0.51,0.52" SpreadMethod="Pad">
                        <GradientStop Offset="0.0" Color="Transparent" />
                        <GradientStop Offset="0.9" Color="Transparent" />
                        <GradientStop Offset="1.0" Color="#a0000000" />
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Ellipse Canvas.Left="3" Canvas.Top="3" Width="94" Height="94">
                <Ellipse.Fill>
                    <RadialGradientBrush Center="0.7,0.8" SpreadMethod="Pad" RadiusX="1.3" RadiusY="1.2">
                        <GradientStop Offset="0.0" Color="Transparent" />
                        <GradientStop Offset="0.4" Color="#30ffffff" />
                        <GradientStop Offset="0.5" Color="#60ffffff" />
                        <GradientStop Offset="0.6" Color="#3fffffff" />
                        <GradientStop Offset="1.0" Color="Transparent" />
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
        </Canvas>
    </Viewbox>
</UserControl>
